<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Java详细查找</title>
<!--[if lt IE 9]>
  <script src="libs/html5shiv.min.js"></script>
  <script src="libs/respond.min.js"></script>
  <![endif]-->
<script src="libs/jquery-1.12.1.min.js"></script>
<script type="text/javascript" src="libs/handlebars.min.js"></script>
<script type="text/javascript" src="libs/getQueryString.js"></script>
<link href="libs/bootstrap-3.3.6/css/bootstrap.min.css" rel="stylesheet">
<script src="libs/bootstrap-3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
	<div class="container">
		<div class="row">
			<div class="page-header">
				<h2>
					<strong>档案管理</strong>
				</h2>
			</div>
			<div class="col-md-8">
				<ul class="nav nav-pills">
					<li class="active"><a href="index.html">首页</a></li>
					<li class=""><a href="add.html">添加</a></li>
					<li class=""><a href="tongji.html">查询</a></li>
				</ul>
				<!--nav-tabs -->
				<ul class="nav nav-tabs">
					<li role="presentation"><a href="#home" aria-controls="home"
						role="tab" data-toggle="tab">档案信息</a></li>
					<li role="presentation" class="active"><a href="#profile"
						aria-controls="profile" role="tab" data-toggle="tab">图片</a></li>
					<li role="presentation"><a href="#messages"
						aria-controls="messages" role="tab" data-toggle="tab">上传图片</a></li>
				</ul>
				<div role="tabpanel" class="tab-pane" id="profile">
					<div class="row" id="profile1">
						<p>
							<img id="tupian" src="" width="200" height="200" />
						</p>
						<div class="panel-body">
							<div class="col-md-2 ">
								<button id="delete" class="btn btn-default btn-block">删除</button>
							</div>
						</div>
					</div>
				</div>
				<div role="tabpanel" class="tab-pane" id="messages"></div>
			</div>
			<div class="col-md-3 col-md-offset-1">
				<ul class="nav nav-pills">
					<li><a href="#">用户：<span id="account"></span></a></li>
					<li class=""><a href="register.html">注册</a></li>
					<li><button id="quit" class="btn btn-block">退出</button></li>
				</ul>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
	$(function() {
		var id = getQueryString('id')
		$.getJSON('queryonedeltp.action?id=' + id, function(res) {
			console.log(id);
			$('#tupian').attr('src',
					'upload/' + res[0].archive_id + '/' + res[0].name);

			$('#delete').click(function() {
				$.post('deltp.action?id=' + id, {}, function(res, stastu) {
					console.log(res);
					if ('OK' == res) {
						alert('删除成功');
						window.location.href = 'one.html';
					}
				});
			});
		});
	});
</script>
</html>